package com.cskaoyan.mapper;

import com.cskaoyan.bean.bo.WxCommentPostBo;
import com.cskaoyan.bean.entity.Comment;
import com.cskaoyan.bean.entity.CommentExample;
import com.cskaoyan.bean.vo.WxCommentPostVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

public interface CommentMapper {
    long countByExample(CommentExample example);

    int deleteByExample(CommentExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Comment record);

    int insertSelective(Comment record);

    List<Comment> selectByExample(CommentExample example);

    Comment selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Comment record, @Param("example") CommentExample example);

    int updateByExample(@Param("record") Comment record, @Param("example") CommentExample example);

    int updateByPrimaryKeySelective(Comment record);

    int updateByPrimaryKey(Comment record);

    // 订单模块插入评论信息
    int insertGoodsComment(@Param("comment") Comment comment);

    // 查询发表的专题评论
    WxCommentPostVo selectById(@Param("id") Integer id);

    // 获取上次自动生成的id
    Integer selectId();

//    int insertComment(@Param("post") WxCommentPostBo wxCommentPostBo);
}